<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'alldesignpro.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet"/> 
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
	<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
	<script type="text/javascript" src="fancybox/jquery.easing-1.3.pack.js"></script>
	<script type="text/javascript" src="fancybox/jquery.fancybox-1.3.4.js"></script>
	<script type="text/javascript" src="fancybox/jquery.fancybox-1.3.4.pack.js"></script>
	<script type="text/javascript" src="fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script>
		$(document).ready(function (){
				 $(".fancybox").fancybox({
				 		'autoScale'   : true,
				 		overlayOpacity:0.5
				 });
		});
			function submitreview(lid){
				var r = $("input[name='zt"+lid+"']:checked").val();
				$.post("updateLabelIsRewiewAction",{"labelId":lid,"isReview":r},function(data){
					if(data=="success"){
						alert("审核完成");
					}else{
						 alert("审核失败");
					}
				});
			}
	</script>
  </head>
  <body>
   			<div align="center">
   				<c:if test="${fn:length(labellist)>0}">
   						<div style="width: 900px; height: 600px;">
   						<table border="1" width="900px;">
   								<tr>
   									<td>设计师姓名</td>
   									<td>设计师电话</td>
   									<td>设计师Email</td>
   									<td>产品功能</td>
   									<td>产品市场前景</td>
   									<td>设计产品图</td>
   									<td>审核状态</td>
   									<td>审核提交</td>
   								</tr>
   								<c:forEach items="${labellist}" var="la">
   										<c:forEach items="${customers}" var="cus">
   											<c:if test="${la.owner==cus.userName}">
   											<tr>
				   									<td>${cus.userRealName}</td>
				   									<td>${cus.usertelePhone}</td>
				   									<td>${cus.userMail}</td>
		   										
				   									<td>${la.labelfunction}</td>
				   									<td>${la.marketobject}</td>
				   									<td>
				   										<a class="fancybox" href="${la.previewPicture}">
				   											<img src="${la.previewPicture}" width="100px;" height="100px;">
				   										</a>
				   									</td>
			   									
			   										<td>
			   											<c:if test="${la.isReView==0}">
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="1">已通过
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="2">不通过<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="3">在生产
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="4">在销售<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="5">已停售
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="6">方案撤销
			   											</c:if>
			   											<c:if test="${la.isReView==1}">
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="1" checked="checked">已通过
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="2">不通过<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="3">在生产
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="4">在销售<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="5">已停售
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="6">方案撤销
			   											</c:if>
			   											<c:if test="${la.isReView==2}">
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="1">已通过
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="2" checked="checked">不通过<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="3">在生产
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="4">在销售<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="5">已停售
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="6">方案撤销
			   											</c:if>
			   											<c:if test="${la.isReView==3}">
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="1">已通过
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="2">不通过<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="3" checked="checked">在生产
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="4">在销售<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="5">已停售
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="6">方案撤销
			   											</c:if>
			   											<c:if test="${la.isReView==4}">
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="1">已通过
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="2">不通过<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="3">在生产
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="4" checked="checked">在销售<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="5">已停售
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="6">方案撤销
			   											</c:if>
			   											<c:if test="${la.isReView==5}">
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="1">已通过
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="2">不通过<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="3">在生产
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="4">在销售<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="5" checked="checked">已停售
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="6">方案撤销
			   											</c:if>
			   											<c:if test="${la.isReView==6}">
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="1">已通过
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="2">不通过<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="3">在生产
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="4">在销售<br/>
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="5">已停售
				   											<input type="radio" name="zt${la.labelId}" id="zt${la.labelId}" value="6"  checked="checked">方案撤销
			   											</c:if>
			   											
			   										</td>
			   										<td>
			   											<input type="button" value="审核提交" onclick="submitreview(${la.labelId})">
			   										</td>
		   									</tr></c:if>
   									   </c:forEach>
   								</c:forEach>
   						</table>
   				</div>
   				</c:if>
   				<c:if test="${fn:length(labellist)<=0}">
   					暂时没有设计师提交的产品系列
   				</c:if>
   			</div>
  </body>
</html>
